package com.h1.staffmanage.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.h1.staffmanage.entity.TEmployee;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author mengfanyu
 * @since 2022-06-23
 */
@Mapper
public interface TEmployeeMapper extends BaseMapper<TEmployee> {
    /**
     * 获取所有员工(分页)
     *
     * @param page
     * @param employee
     * @param beginDateScope
     * @return
     */
    IPage<TEmployee> getEmployeeByPage(Page<TEmployee> page, @Param("employee") TEmployee employee, @Param("beginDateScope") LocalDate[] beginDateScope);

    /**
     * 导出员工数据
     *
     * @param id
     * @return
     */
    List<TEmployee> getEmployee(Integer id);

    /**
     * 获取所有员工账套
     *
     * @param page
     * @return
     */
    IPage<TEmployee> getEmployeeWithSalary(Page<TEmployee> page);
}
